Home / Data table / Table details

Data table ‐ Table details


Details of a single table

Endpoint

GET /api/datatable/details/:tableName

Parameters:

  • :tableName - name of the table

Headers

see Using authentication token

Response

  • Invalid response: See Invalid response in Standard response rules
  • Valid response
    Valid response in same as in List of all data tables with the two only differences being that: 1. field data instead of containing list of objects with info about data tables is a single object with info only about one data table, the one specified in the :tableName parameter of the url, 2. there's no pagination field.

        {
            "valid": true,
            "data": {
                "name": "some table",
                "type": "api",
                "primary_key": "id",
                "columns": {
                    "id": {
                        "primary": true,
                        "type": "integer",
                        "mandatory": false
                    },
                    "client_id": {
                        "primary": false,
                        "type": "integer",
                        "mandatory": false
                    } 
                }
            } 
        }

Example code:

<?php

require_once 'RestOpen.php';

$username = 'my_username';
$password = 'my_password';
$workspaceId = 999;
$tableName = 'your_table_name';

$rest = new RestOpen($username, $password, $workspaceId);
$result = $rest->getDataTableDetails($tableName);

var_dump($result);